//
//  AFNHTTPSessionManager.h
//  Logistics
//
//  Created by zhlzhl on 16/1/15.
//  Copyright © 2016年 zhlzhl. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>
#import "AFNetworking.h"
//#import "configHeader.h"
//定义返回请求数据的block类型
typedef void (^ReturnValueBlock) (id returnValue);
typedef void (^ErrorCodeBlock) (id errorCode);
typedef void (^FailureBlock)(void);
@interface AFNHTTPSessionManager : AFHTTPSessionManager
+ (instancetype)sharedManager;
/*
 *brief 检查网络状态
 */
+ (void)checkNetWorkStatus;
/**
 *
 *
 *brief post方法获取数据
 *param Parameters 参数字典集合
 *param suburl 接口地址
 *param block  数据回调block
 */
+ (void)postWithParameters:(NSDictionary *)Parameters
                    subUrl:(NSString *)suburl
                    WithReturnValeuBlock: (ReturnValueBlock) returnBlock
                    WithErrorCodeBlock: (ErrorCodeBlock) errorBlock
                    WithFailureBlock: (FailureBlock) failureBlock;
/*
 *brief get方法获取数据
 *param Parameters 参数字典集合
 *param suburl 接口地址
 *param block  数据回调block
 */
+ (void)getInfoWithSubUrl:(NSString *)subUrl
               parameters:(NSDictionary *)Parameters
                WithReturnValeuBlock: (ReturnValueBlock) returnBlock
                WithErrorCodeBlock: (ErrorCodeBlock) errorBlock
                WithFailureBlock: (FailureBlock) failureBlock;
@end
